package experiments.idea_template;

public class StrReplace {

    public static void main(String[] args) {

//        String rawStr = "src.idea_template.MainTpIn";
        String rawStr = "MainTpIn";

        String[] pathFile = processPackageFile(rawStr);

        System.out.println(pathFile[0]);
        System.out.println(pathFile[1]);

    }

    static String[] processPackageFile(String pathFile)
    {
        pathFile = pathFile.replace('.','/');
        int lastIndex = pathFile.lastIndexOf("/");

        String packagePath = pathFile.substring(0,lastIndex+1);
        String txtName = pathFile.substring(lastIndex+1);

        return new String[]{packagePath, txtName};
    }
}
